'use strict';

const Controller = require('egg').Controller;
class HomeController extends Controller {
  async index() {
    const { ctx } = this;
    const result = await ctx.service.doubanHot.getAll();
    ctx.body = result;
    // console
  }
  async runDoubanCrawler() {
    const { ctx } = this;
    const result = await ctx.service.doubanHot.runDoubanCrawler();
    ctx.body = result;
  }
}

module.exports = HomeController;
